package com.morningstar.flow.dao.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import lombok.Getter;
import lombok.Setter;

@Setter
@Getter
@TableName(value = "flow_node", autoResultMap = true)
public class FlowNode {

    @TableId(value = "node_id", type = IdType.ASSIGN_ID)
    private Long nodeId;

    @TableField("process_id")
    private Long processId;

    @TableField("process_define_key")
    private String processDefineKey;

    @TableField("node_activity_id")
    private String nodeActivityId;

    @TableField("node_name")
    private String nodeName;

    @TableField("node_type")
    private String nodeType;

    @TableField(value = "node_config", typeHandler = JacksonTypeHandler.class)
    private Object nodeConfig;

    @TableField("source")
    private String source;

    @TableField("target")
    private String target;
}
